﻿using System;

namespace PrimeFactorConsole
{
    public class PrimeFactor
    {
        static void Main(string[] args)
        {
            int num;
            num = Convert.ToInt32(Console.ReadLine());
            Console.Write(num + "的所有素数因子为：");
            int i, j;
            for(i = 2; i <= Math.Sqrt(num); i++)
            {
                if(num % i == 0)
                {
                    for(j = 2; j <= Math.Sqrt(i); j++)
                    {
                        if (i % j == 0)
                            break;
                    }
                    if(j <= Math.Sqrt(i))
                    {
                        continue;
                    }
                    else
                        Console.Write(i + " ");
                }
            }
            Console.WriteLine();

        }
    }
}

